1. Field of the Invention
The present invention relates to an image processing apparatus and an image processing method, and, more particularly, to a technique suitable for generating a high-quality mosaic image even in a case where material images having shapes different from those of corresponding regions are used.
2. Description of the Related Art
A photo mosaic method of dividing a single target image into a plurality of regions and replacing the regions with different images (material images) having similar colors is known (Japanese Patent Laid-Open No. 2009-171158). The photo mosaic method is used for corporate advertising in which a single poster is created with images brought by a plurality of users.
In a case where the mosaic image generation apparatus disclosed in Japanese Patent Laid-Open No. 2009-171158 is used, material images are neatly arranged in regions having the same size. Accordingly, a viewer may not notice that a resultant image is a mosaic image or may have a monotonous feeling about the mosaic image. Japanese Patent Laid-Open No. 2011-78078 discloses an image processing apparatus and a mosaic image generation method with which the sizes of regions, into which an image has been divided, are individually changed in accordance with details of the image and the texture of a characteristic part of the image can be represented in detail. Japanese Patent Laid-Open No. 2011-54080 discloses an image processing apparatus that can obtain a high-quality photo mosaic image by dividing an image into regions having shapes other than a rectangular shape.
However, since the image processing apparatuses disclosed in Japanese Patent Laid-Open Nos. 2011-78078 and 2011-54080 arrange material images in regions to generate a mosaic image, they cannot arrange material images having shapes different from those of the regions without changing the shapes of the material images. Accordingly, it is impossible to generate a high-quality mosaic image with material images whose shapes have an important meaning (for example with only portraits cut out from snapshots).